

package com.qiyu.mq.core.listener;

import com.qiyu.mq.core.annotation.MqConsumer;
import com.qiyu.mq.core.consumer.ConcurrentlyConsumer;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;

/**
 * @author  idea
 * @version V1.0
 * @date 2020/8/10
 */
@MqConsumer(tag = "*", topic = "Qiyu-Topic", messageModel = MessageModel.CLUSTERING)
public class OrderTopicListener implements ConcurrentlyConsumer<MessageExt> {

    @Override
    public ConsumeConcurrentlyStatus consume(MessageExt messageExt) {
        System.out.println("消费数据为：{}" + messageExt.getBody().toString());
        return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
    }
}
